﻿public class Card
{
    public int id;
    public string cardName;
    public int mana; // 将 mana 添加到基类

    // 构造函数
    public Card(int id, string cardName, int mana)
    {
        this.id = id;
        this.cardName = cardName;
        this.mana = mana;
    }
}
public class AttackCard : Card
{
    public int attack;
    public int attackTime;

    public AttackCard(int _id, string _cardName, int _attack, int _mana)
        : base(_id, _cardName, _mana) // 调用基类构造函数
    {
        this.attack = _attack;
        attackTime = 2;
    }
}
public class SpellCard : Card
{
    public int effectvalue;
    public string effect;

    public SpellCard(int _id, string _cardName, string _effect, int _effectvalue, int _mana) : base(_id, _cardName, _mana)
    {
        this.effect = _effect;
        this.effectvalue = _effectvalue;

    }
}
public class ShieldCard : Card
{
    public string effect;
    public int Shield;
    public ShieldCard(int _id, string _cardName, int _Shield, int _mana) : base(_id, _cardName, _mana)
    {
        this.Shield = _Shield;
    }
}
public class CharacterCard : Card
{
    public int healthPoint; // 生命值
    public string skill;   // 技能
    public int shield;
    // 构造函数
    public CharacterCard(int _id, string _cardName, int _healthPoint, int _mana, string _skill, int _shield) : base(_id, _cardName, _mana)
    {
        this.healthPoint = _healthPoint;
        this.skill = _skill;
        this.shield = _shield;
    }
}